import React from 'react'
import { withRouter } from 'react-router-dom'

function Me(props) {
  return (
    <div>
      <div>Me</div>
      <button onClick={()=>{
        console.log(props)
        props.history.push('/asd')
      }}>去买单</button>
    </div>
  )
}

export default withRouter(Me);   //因为Me这一路由是在render函数中使用的，所以要用withRouter来使得其能够获取props